<?php
/**
 * Description of StockViewModel
 *
 * @author Mike Gao
 */
class StockViewModel extends ViewModel{
    protected $pk  = 'Stock.id';

    public $viewFields = array(
        'Product' => array('id'=>'pid', 'name', 'helpword','unit_id','cat_id','cost_default','minstock'),
        'Stock' => array('id'=>'sid','number','warehouse_id', '_on' => 'Product.id = Stock.product_id'),
        //'Warehouse' => array('name'=>'wname', '_on' => 'Stock.warehouse_id = Warehouse.id'),
    );


}
?>
